package com.ytjj.qmyx.mall.service.impl;

import com.ytjj.qmyx.mall.mapper.MessageRecordMapper;
import com.ytjj.qmyx.mall.model.MessageRecord;
import com.ytjj.qmyx.mall.model.MessageRecordDto;
import com.ytjj.qmyx.mall.service.MessageRecordService;
import lombok.extern.slf4j.Slf4j;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.List;

@Service
@Slf4j
public class MessageRecordServiceImpl implements MessageRecordService {
    @Resource
    private MessageRecordMapper messageRecordMapper;

    @Override
    public MessageRecordDto getMessageListNoReadNum(String tel, Integer type, String startTime) {
        MessageRecordDto dto = messageRecordMapper.getMessageListNoReadNum(tel, type, startTime);
        return dto;
    }

    @Override
    public List<MessageRecord> getMessageItem(String tel, Integer type) {
        List<MessageRecord> list = messageRecordMapper.getMessageItem(tel, type);
        return list;
    }

    @Override
    public void updateMessageReadStatus(String tel, Integer type) {
        messageRecordMapper.updateMessageReadStatus(tel, type);
    }
}
